<style>
        .profile-user-box {
            display: flex;
            align-items: flex-start;
            background-color: #66CCFF;
            color: #fff;
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 15px;
        }

        .profile-image {
            flex-shrink: 0;
        }

        .rounded-circle {
            width: 100px;
            height: 100px;
            object-fit: cover;
            border-radius: 50%;
        }

        .profile-content {
            flex-grow: 1;
            margin-left: 20px;
        }

        .profile-details {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 10px;
        }

        .profile-detail {
            width: 120px;
        }

        .buttons-container {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-end;
        }

        .btn-custom {
            font-size: 12px;
            padding: 5px 10px;
        }
    </style>
<body>
    <div class="container-fluid p-t-15">
        <div class="row">
            <div class="col-sm-12">
                <div class="profile-user-box">
                    <div class="profile-image">
                        <img src="//q3.qlogo.cn/headimg_dl?bs=qq&dst_uin=<?=$userrow['qq']?>&src_uin=<?=$userrow['qq']?>&fid=<?=$userrow['qq']?>&spec=100&url_enc=0&referer=bu_interface&term_type=PC" alt="用户头像" class="rounded-circle">
                    </div>
                    <div class="profile-content">
                        <div class="profile-header">
                            <h5><?=hello_user($userrow['user'])?></h5>
                        </div>
                        <div class="profile-details">
                            <div class="profile-detail">当前余额<br><strong>¥<?=$userrow['money']?></strong></div>
                            <div class="profile-detail">PID<br><strong><?=$userrow['pid']?></strong></div>
                            <div class="profile-detail">会员状态<br><strong><?=$vip?></strong></div>
                        </div>
                        <a href="tencent://message/?uin=<?=$conf['qq']?>" class="btn btn-xs btn-success btn-custom">联系客服</a>
                    </div>
                    <div class="buttons-container">
                        <button  type="button" class="btn btn-light" style="margin-bottom: 5px;" onclick="Reset_key();">重置对接KEY</button>
                        <a href="./Api_Set" class="btn btn-light">查看对接KEY</a>
                      </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6 col-lg-6 col-xl-6">
                <div class="card">
                    <div class="card-body">
                        <h4 class="header-title mb-2">平台公告</h4>
                        <div class="timeline-alt pb-0">
                           <?=fetchTimelineItems()?><!--公告 展示函数-->
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-6 col-md-3">
                <div class="card bg-primary">
                    <div class="card-body clearfix">
                        <div class="pull-right">
                            <p class="h6 text-white m-t-0">可用额度</p>
                            <p class="h3 text-white m-b-0 fa-1-5x"><?=$userrow['money']?></p>
                        </div>
                        <div class="pull-left">
                            <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-currency-cny fa-1-5x"></i></span>
                        </div>
                    </div>
                </div>
            </div>
           
          <div class="col-sm-6 col-md-3">
              <div class="card bg-danger">
                    <div class="card-body clearfix">
                          <div class="pull-right">
                            <p class="h6 text-white m-t-0">成功订单</p>
                            <p class="h3 text-white m-b-0 fa-1-5x"><?=$count2?></p>
                          </div>
                        <div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-basket fa-1-5x"></i></span> </div>
                    </div>
              </div>
        </div>
        <div class="col-sm-6 col-md-3">
              <div class="card bg-success">
                <div class="card-body clearfix">
                  <div class="pull-right">
                    <p class="h6 text-white m-t-0">完成金额</p>
                    <p class="h3 text-white m-b-0 fa-1-5x"><?=$count3?></p>
                  </div>
                  <div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-currency-cny fa-1-5x"></i></span> </div>
                </div>
              </div>
        </div>
        <div class="col-sm-6 col-md-3">
              <div class="card bg-purple">
                <div class="card-body clearfix">
                  <div class="pull-right">
                    <p class="h6 text-white m-t-0">订单总数</p>
                    <p class="h3 text-white m-b-0 fa-1-5x"><?=$count1?></p>
                  </div>
                  <div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-basket fa-1-5x"></i></span> </div>
                </div>
              </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12 col-lg-12 col-xl-12 align-self-center">
            <div class="card bg-white m-b-30">
                <div class="card-body new-user">
                    <div class="table-responsive">
                        <table class="table table-bordered">
                            收支明细(近2天 且只统计已付过款的订单)
                            <hr>
                            <thead>
                              <tr>
                                <th>#</th>
                               <th>名称</th>
                               <th>今日订单</th>
                               <th>昨日订单</th>
                               <th>今日金额</th>
                               <th>昨日金额</th>
                               <th>同比</th>
                                </tr>
                            </thead>
                                <tbody>
                                    <?php
                                        $html = '';
                                        foreach ($paymentTypes as $type) {
                                            $rowData = [
                                                ['label' => '<img src="/Core/assets/img/' . $type . '.jpeg" alt="user" style="border-radius: 50%;max-width: 35px; max-height: 35px;">'],
                                                ['label' => pay_type($type)],
                                                ['label' => $order[$type]['todayOrder']],
                                                ['label' => $order[$type]['lastday']],
                                                ['label' => $order[$type]['todayOrdermoney']],
                                                ['label' => $order[$type]['lastdaymoney']],
                                                ['label' => $order[$type]['t'] . '%'],
                                            ];
                                            $html .= Splicing_form($rowData);
                                        }
                                        echo $html;
                                        ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div> 
      </div>
</div>
    <!-- 弹窗代码 -->
    <div class="modal inmodal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                </div>
                <div class="modal-body">
                    <?php echo $conf['modal']?>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-xs btn-danger" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
    
    
    
</body>
<script type="text/javascript" src="<?=userassets?>core_js/Reset_key.js"></script>
 <script>
<?php if(!empty($conf['modal'])){?>
$('#myModal').modal('show');
<?php }?>

</script>
